// JavaScript Document
$(function(){
	$(".pageColumn table tbody tr").hover(function(){
		this.style.backgroundColor="#DDECF1";
	 }, function(){
		 this.style.backgroundColor="#FFFFFF";
	 });
	$(".TwoSide tr td:even").css({"text-align" : "right" });
	$(".TwoSide tr td:odd").css({"text-align" : "left" , "padding-left" : "20px" });
	$(".show tr td").css({"text-align" : "center" , "padding-left" : "0px" });
	$(".label tr td").css({"text-align" : "left" , "padding-left" : "20px" });
});


function ShowDIV(thisObjID) {
          $("#BgDiv").css({ display: "block", height: $(document).height() });
          var yscroll = document.documentElement.scrollTop;
          $("#" + thisObjID).css("top", "100px");
          $("#" + thisObjID).css("display", "block");
         ument.documentElement.scrollTop = 0;
 }

function Showalt(order)
{
	var obj=document.getElementById("launch_"+order);
	if(obj.checked)
	{
		document.getElementById('picintro_'+order).disabled=false;
		document.getElementById('pattern_'+order).disabled=false;
	}
	else
	{
		document.getElementById('picintro_'+order).disabled=true;
		document.getElementById('pattern_'+order).disabled=true;
	}
}

function CreateImg()
{
	var num=$(".lists").size();
	var table=document.getElementById("show");
	var alter1=document.getElementById("alter1");
	var tr=document.createElement("tr");
	//var alter=document.getElementById("alter");
	tr.innerHTML="<td><input type='text' size='5' name='order[]' value='0'></td><td><input type='file' name='files_"+num+"'></td><td><input type='text' size='15' name='alt[]'></td><td><input type='checkbox' name='launch["+num+"]' id='launch_"+num+"' onclick='Showalt("+num+");'></td><td><textarea cols='50' rows='4' name='picintro["+num+"]' disabled='true' id='picintro_"+num+"'></textarea></td><td><select name='pattern["+num+"]' disabled='true' id='pattern_"+num+"'><option selected='selected' value='1'>左文右图</option><option value='2'>右文左图</option><option value='3'>上文下图</option><option value='4'>下文上图</option></select></td>";
	table.insertBefore(tr,alter1);
	tr.setAttribute("class","lists");
}

function CreateOption()
{
	var table=document.getElementById("label");
	var alter2=document.getElementById("alter2");
	var tr=document.createElement("tr");
	tr.innerHTML="<td style='text-align: left; padding-left: 20px;'>序号：<input type='text' name='l_order[]' size='5' />--<input type='text' size='30' name='labelkey[]'/>&nbsp;<strong>：</strong></b>&nbsp;<input type='text' size='30' name='labelvalue[]'/>（不超过25个字）</td>";
	table.insertBefore(tr,alter2);
	
}

function DeleteDom()
{
	
}
